﻿<Fluent:RibbonWindow x:Class="AppFabric.Admin.Client.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:lex="http://schemas.root-project.org/xaml/presentation"
        xmlns:Stema="http://www.stemasoft.com/xaml"
        xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
        xmlns:uc="clr-namespace:AppFabric.Admin.Client.Controls"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
        xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
        xmlns:model="clr-namespace:AppFabric.Admin.Client.Core.Model;assembly=AppFabric.Admin.Client.Core"             
        Title="{lex:LocText Key=ApplicationTitle, Dict=Resources, Assembly=AppFabric.Admin.Client}"
        Icon="Resources\app_icon.ico"
        Height="648"
        Width="864"
        DataContext="{Binding Main, Source={StaticResource Locator}}">

    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <cmd:EventToCommand Command="{Binding WindowLoadedCommand, Mode=OneWay}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <Style x:Key="NavigationPaneItemStyle" TargetType="Stema:NavigationPaneItem">
                <Setter Property="Header" Value="{Binding Name}" />
                <Setter Property="Image" Value="Resources\environment.png" />
                <Setter Property="ButtonToolTip" Value="{Binding Description}" />
            </Style>
            
            <Style x:Key="BackStageTabItemUCStyle" TargetType="UserControl">
                <Setter Property="Margin" Value="10 10 10 10" />
            </Style>
        </ResourceDictionary>
       
    </Window.Resources>

    <DockPanel x:Name="RootPanel">
        <Fluent:Ribbon x:Name="MainRibbons" DockPanel.Dock="Top">
            <Fluent:Ribbon.Menu>
                <Fluent:Backstage>
                    <Fluent:BackstageTabControl>
                        <Fluent:BackstageTabItem x:Name="ConfigurationBackstageTabItem" Header="{lex:LocText Key=ConfigurationTitle, Dict=Resources, Assembly=AppFabric.Admin.Client}">
                            <uc:ConfigurationUserControl Style="{DynamicResource ResourceKey=BackStageTabItemUCStyle}" />
                        </Fluent:BackstageTabItem>
                        <Fluent:BackstageTabItem x:Name="HelpBackstageTabItem" Header="{lex:LocText Key=HelpTitle, Dict=Resources, Assembly=AppFabric.Admin.Client}">
                            <uc:HelpUserControl Style="{DynamicResource ResourceKey=BackStageTabItemUCStyle}" />
                        </Fluent:BackstageTabItem>
                        <Fluent:Button x:Name="ExitApplicationButton"
                                   Header="{lex:LocText Key=ExitApplication, Dict=Resources, Assembly=AppFabric.Admin.Client}"
                                   Icon="Resources/exit.gif"
                                   Command="{Binding CloseCommand, Mode=OneWay}" />
                    </Fluent:BackstageTabControl>
                </Fluent:Backstage>
            </Fluent:Ribbon.Menu>

            <Fluent:RibbonTabItem x:Name="AdministrationRibbon" Header="{lex:LocText Key=AdministrationTabTitle, Dict=Resources, Assembly=AppFabric.Admin.Client}">
            </Fluent:RibbonTabItem>

            <Fluent:RibbonTabItem x:Name="MonitoringRibbon" Header="{lex:LocText Key=MonitoringTabTitle, Dict=Resources, Assembly=AppFabric.Admin.Client}">
            </Fluent:RibbonTabItem>

            <Fluent:RibbonTabItem x:Name="SearchRibbon" Header="{lex:LocText Key=SearchTabTitle, Dict=Resources, Assembly=AppFabric.Admin.Client}">
            </Fluent:RibbonTabItem>

        </Fluent:Ribbon>

        <Stema:NavigationPane x:Name="EnvironmentNavigationPanel"
                              DockPanel.Dock="Left"
                              MinWidth="160"
                              ItemsSource="{Binding Items, Mode=OneWay}"
                              ItemContainerStyle="{DynamicResource ResourceKey=NavigationPaneItemStyle}"
                              SelectedIndex="{Binding SelectedIndex}" >
            <Stema:NavigationPane.BarTitle>
                <TextBlock Text="{lex:LocText Key=NavPanBarTitle, Dict=Resources, Assembly=AppFabric.Admin.Client}" FontWeight="Bold" FontSize="14.667"/>
            </Stema:NavigationPane.BarTitle>
        </Stema:NavigationPane>

        <TabPanel x:Name="ContentPanel" DockPanel.Dock="Right"></TabPanel>
    </DockPanel>
</Fluent:RibbonWindow>
